unit InfComanda;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TFormInfComanda = class(TForm)
    Label1: TLabel;
    EditComanda: TEdit;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormInfComanda: TFormInfComanda;

implementation

uses Restaurante, PedidoMesa, Principal, PedidoComanda;

{$R *.dfm}

procedure TFormInfComanda.BitBtn1Click(Sender: TObject);
begin

    if trim(EditComanda.Text) <> '' then
    begin
        if assigned(FormPedidoComanda) then
        FormPedidoComanda := nil;
        FormPedidoComanda := TFormPedidoComanda.Create(Self);

        FormPedidoComanda.xNrComanda :=  StrToInt(EditComanda.Text);

        FormPedidoComanda.UpDown1.Visible := false;

        FormPedidoComanda.ShowModal;

        FormRestaurante.QueryComandas.ParamByName('p_id_movimento').AsInteger := FormPrincipal.vIdmovimento;
        FormRestaurante.QueryComandas.Open;

        

    end;



end;

end.
